home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
script2.zip
/
SCRIPT2.PPS
< prev
next >
Wrap
Text File
|
1993-03-01
|
50KB
|
1,525 lines
;*****************************************************************************
;* Ordering Questionnaire for All New Orders, Support Renewals & Upgrades *
;* Copyright 1993 (C)Clark Development Company, Inc. *
;* *
;* SCRIPT2.PPS (Souce code for Script 2) *
;* SCRIPT2.PPE (Compiled version of SCRIPT2.PPS) *
;* COUNTRY.IDX (List of Countries for Shipping Calculations) *
;* DOMESTIC.IEX (Doimestic Federal Express Shipping Rates) *
;* OVERSEAS.FEX (International Federal Express Rates) *
;* OVERSEAS.DHL (International DHL Rates) *
;* SCRIPT (Script MENU file) *
;* CHOICES.TXT (Main Menu of choices available) *
;* NEWPROD.TXT (New Products Sub-Menu) *
;* PCBSTAN.TXT (Standard Products Menu) *
;* PCB-M.TXT (/M Code Products Menu) *
;* UPGRADE.TXT (Upgrade Menu) *
;* OTHERSW.TXT (Other Software Menu - DOORWAY, ToolKit, etc.) *
;* PACKAGE.TXT (Bundled deals menu) *
;* HARDWARE.TXT (Hardware menu) *
;* SPRT.TXT (Support Renewal Menu *
;* *
;*****************************************************************************
;*****************************************************************************
;* Define variable types *
;*****************************************************************************
string Answer
string Command
string Name
string SerialNo
string Company
string Address
string City
string State
string Zip
string Country
string ShipName
string ShipCompany
string ShipAddress
string ShipCity
string ShipState
string ShipZip
string ShipCountry
string CCNum
string CCExpire
string CCPhone
string CCName
string CCType
string CCDisplay
string CCExpireDisplay
string VoicePhone
string FaxPhone
string TShirtSize
string Comment1
string Comment2
string CustomerNumber
;************************************
;* Used for Display Selections Made *
;************************************
string SelectionDisplay
string StandardDisplay
string PackageDisplay
string MCodeDisplay
string UpgradeDisplay
string OtherSWDisplay
string HardwareDisplay
string SupportDisplay
string OrderText(10)
string PriceDisplay
string Domestic
string Foreign
string FileCountry
string FEXZone
string DHLZone
string OverSeasShipType
string DomesticShipType
;*****************************************************************
;* Used for identifying products ordered, their price and weight *
;* In the arrays below, element 1 is the price, 2 is the weight *
;*****************************************************************
integer Standard,StandardPrices(5,2)
integer MCode
integer MCodePrices(4,2)
integer Upgrade
integer UpgradePrices(7,2)
integer OtherSW
integer OtherSWPrices(4,2)
integer Package
integer PackagePrices(3,2)
integer Hardware
integer HardwarePrices(5,2)
integer Support
integer SupportPrices(2)
integer OrderArray(10,2)
integer TotalWeight
integer SubTotal
integer TotalFreight
integer TotalPrice
integer CardMonth
integer CardYear
integer ThisMonth
integer ThisYear
integer NumOrders
integer StartNum
integer NumDisp
integer Item
integer DLPrice
integer FEXEcon
integer FEXStan
integer FEXPrio
integer DHLPrio
integer CanadaUPS
boolean OutSideUSA
boolean ShipDifferent
boolean DownloadOnly
boolean Extended
boolean UnableWieght
boolean Review
boolean Match
boolean OrderPlaced
boolean Error
boolean OnLocal
;*****************************************************************************
;* Define Defaults *
;*****************************************************************************
Country="USA"
;*****************************************
;* PCBoard Standard Prices & Weight *
;*****************************************
StandardPrices(1,1)=170
StandardPrices(2,1)=340
StandardPrices(3,1)=680
StandardPrices(4,1)=1000
StandardPrices(5,1)=2500
StandardPrices(1,2)=4
StandardPrices(2,2)=4
StandardPrices(3,2)=4
StandardPrices(4,2)=4
StandardPrices(5,2)=4
;*****************************************
;* PCBoard /M Prices & Weight *
;*****************************************
MCodePrices(1,1)=440
MCodePrices(2,1)=780
MCodePrices(3,1)=1100
MCodePrices(4,1)=2600
MCodePrices(1,2)=4
MCodePrices(2,2)=4
MCodePrices(3,2)=4
MCodePrices(4,2)=4
;*****************************************
;* Upgrade Prices & Weight *
;*****************************************
UpgradePrices(1,1)=85
UpgradePrices(2,1)=195
UpgradePrices(3,1)=535
UpgradePrices(4,1)=365
UpgradePrices(5,1)=685
UpgradePrices(6,1)=345
UpgradePrices(7,1)=100
UpgradePrices(1,2)=4
UpgradePrices(2,2)=4
UpgradePrices(3,2)=4
UpgradePrices(4,2)=4
UpgradePrices(5,2)=4
UpgradePrices(6,2)=4
UpgradePrices(7,2)=1
;*****************************************
;* Other Software Prices & Weight *
;*****************************************
OtherSWPrices(1,1)=180
OtherSWPrices(2,1)=275
OtherSWPrices(3,1)=40
OtherSWPrices(4,1)=179
OtherSWPrices(1,2)=4
OtherSWPrices(2,2)=2
OtherSWPrices(3,2)=1
OtherSWPrices(4,2)=3
;*****************************************
;* Package Prices & Weight *
;*****************************************
PackagePrices(1,1)=1060
PackagePrices(2,1)=1525
PackagePrices(3,1)=1830
PackagePrices(1,2)=14
PackagePrices(2,2)=18
PackagePrices(3,2)=18
;*****************************************
;* Hardware Prices & Weight *
;*****************************************
HardwarePrices(1,1)=495
HardwarePrices(2,1)=515
HardwarePrices(3,1)=995
HardwarePrices(4,1)=1035
HardwarePrices(5,1)=179
HardwarePrices(1,2)=5
HardwarePrices(2,2)=7
HardwarePrices(3,2)=7
HardwarePrices(4,2)=12
HardwarePrices(5,2)=2
;*****************************************
;* Support Prices *
;*****************************************
SupportPrices(1)=60
SupportPrices(2)=120
;*****************************************************************************
;* Get Information from PCBOARD.SYS for this caller *
;*****************************************************************************
:GetCustomerInfo
GETUSER
Name=U_Name()
Name=upper(Name)
if (Name="FRED CLARK" | Name="DAVID TERRY") goto SkipDefaults
if (Name="JOE ROBINSON" | Name="SCOTT ROBISON") goto SkipDefaults
if (Name="SCOTT CARPENTER" | Name="DANIEL CHLARSON") goto SkipDefaults
if (Name="RICHARD KOZIK" | Name="STEVE CATMULL") goto SkipDefaults
if (Name="LOUIS ZIRKEL" | Name="MATT SMITH") goto SkipDefaults
if (Name="DAVID CLAYTON") goto SkipDefaults
CCName=Name
SerialNo=mid(U_CMNT2,1,6)
VoicePhone=U_HVPHONE
CCPhone=VoicePhone
Answer=U_CMNT2
Answer=rtrim(Answer," ")
CustomerNumber=right(Answer,6)
Answer=""
goto GetCCInfo
:SkipDefaults
Name=""
OnLocal=True
;*****************************************************************************
;* Before they start placing their order, get some valid information to find *
;* out if they will be using a valid credit card, etc. *
;*****************************************************************************
:GetCCInfo
cls
println "@X0EWe accept the following credit cards:"
println
println "@X0F (1) VISA"
println "@X0F (2) MasterCard"
println "@X0F (3) American Express/Optima"
println "@X0F"
println "@X0F (A) Abort, I don't have a Credit Card!"
println
inputstr "Enter the Credit Card Type for this order: (1/2/3/A)",CCType,@X0E,1,"123Aa",10
println
if (CCType="1") goto GetVISAInfo
if (CCType="2") goto GetMASTInfo
if (CCType="3") goto GetAMEXInfo
Answer="N"
beep
println
inputyn "Are you sure you want to abort this script (Y/N)",Answer,@X0C
if (Answer<>"Y") goto getccinfo
println
goto abortscript
;**********************************
;* Bad Credit Card Number *
;**********************************
:BadCCNum
beep
println
println "@X8CThe card number you entered was invalid. Either you selected"
println "the wrong credit card type vs the card number entered, or you did"
println "failed to enter the proper number of digits. Please try again ..."
println "@X0E"
gosub pressakey
goto GetCCInfo
;**********************************
;* Get VISA Info *
;**********************************
:GetVISAInfo
inputstr " Enter the VISA Card Number",CCNUM,@X0E,16,"1234567890",2
println
if (left(CCnum,1)<>"4") goto BadCCNum
if (len(CCNum)=13 | len(CCNUM)=16) goto GetCCExpireDate
goto BadCCNum
;**********************************
;* Get MasterCard Info *
;**********************************
:GetMASTInfo
inputstr " Enter the MasterCard Number",CCNUM,@X0E,16,"1234567890",2
println
if (left(CCnum,1)<>"5") goto BadCCNum
if (len(CCNUM)<>16) goto BadCCNum
goto GetCCExpireDate
;**********************************
;* Get American Express Info *
;**********************************
:GetAMEXInfo
inputstr " Enter the AMEX Card Number",CCNUM,@X0E,15,"1234567890",2
println
if (left(CCnum,1)<>"3") goto BadCCNum
if (len(CCNUM)<>15) goto BadCCNum
goto GetCCExpireDate
;**********************************
;* Get Card's Expiration Date *
;**********************************
:GetCCExpireDate
inputstr " Expiration date (@X0CMMYY@X0E) format",CCExpire,@X0E,4,"1234567890",2
println
if (len(CCExpire)=4) goto CheckDate
beep
println
println "@X0CError in expiration date format! Please try again ..."
println "@X0E"
goto GetCCExpireDate
:BadCCExpire
beep
println
println "@X0CError in expiration date! Please try again ..."
println "@X0E"
goto GetCCExpireDate
:CheckDate
CardMonth=left(ccexpire,2)
CardYear=mid(ccexpire,3,2)
ThisMonth=month(date())
ThisYear=Year(date())
if (CardMonth>12 | CardMonth<1) goto BadCCExpire
If (CardYear>ThisYear) goto GetCCName
if (CardYear=ThisYear & CardMonth>=ThisMonth) goto GetCCName
println
beep
println "@X0CThat card has expired!"
println
println "@X0E Enter (R) to re-enter the card's expiration date."
println "@X0E Enter (D) to use a different credit card."
println "@X0E Enter (A) to abort this order and return."
println
Command="R"
inputstr "Your Choice: (R/D/A)",Command,@X0E,1,"RDA",@X0E,10
println
if (Command="R") goto GetCCExpireDate
if (Command="D") goto GetCCInfo
goto AbortScript
;***************************************
;* Get Card Holder's Name *
;***************************************
:GetCCName
inputtext " Enter the Cardholder's Name",CCName,@X0E,50
println
CCName=upper(CCName)
Name=CCName
ShipName=CCName
inputstr "Enter the Cardholder's Phone #",CCPhone,@X0E,13,"1234567890.-()/",2
VoicePhone=CCPhone
CLS
println "@X0EYou have entered the following Credit Card information:"
println
if (CCType="1" & len(CCNum)=13) CCDisplay=left(CCNum,4)+"-"+mid(CCNum,5,3)+"-"+mid(CCNum,8,3)+"-"+mid(CCNum,11,3)
if (CCType="1" & len(CCNum)=16) CCDisplay=left(CCNum,4)+"-"+mid(CCNum,5,4)+"-"+mid(CCNum,9,4)+"-"+mid(CCNum,13,4)
if (CCType="2") CCDisplay=left(CCNum,4)+"-"+mid(CCNum,5,4)+"-"+mid(CCNum,9,4)+"-"+mid(CCNum,13,4)
if (CCType="3") CCDisplay=left(CCNum,4)+"-"+mid(CCNum,5,6)+"-"+mid(CCNum,11,5)
ccexpiredisplay=left(ccexpire,2)+"/"+mid(ccexpire,3,2)
print "@X0F Credit Card #: "
println "@X07",CCDisplay
print "@X0F Expiration Date: "
println "@X07",CCExpireDisplay
print "@X0FCardholders Name: "
println "@X07",CCName
print "@X0F Phone: "
println "@X07",CCPhone
println
Answer="Y"
inputyn "Is the above information correct (Y/N)",Answer,@X0E
println "@X07"
if (Answer="Y") goto GetNameInfo
goto GetCCInfo
;***********************************************
;* Now get Purchaser & Billing Information *
;***********************************************
:GetNameInfo
cls
println "@X0FNow that we have valid credit card information, you need to complete"
println "your billing and shipping information. In order for the script to"
println "properly calculate your freight and other functions, you @X0AMUST@X0F enter"
println "your State/Province and Country in their appropriate fields. Please do"
println "@X0CNOT@X0F include your State and Zip (Postal) code in the 'City' field."
println
println "Customers from outside the US and Canada may need to use the 'Company'"
println "or 'City' fields in order to enter all of your information properly."
println
:GetCustName
if (SerialNo="" | left(SerialNo,1)=" ") SerialNo="None"
inputstr " Serial # (if applicable)",SerialNo,@X0E,6,"1234567890",2
println
if (SerialNo="" | left(SerialNo,1)=" " | left(SerialNo,1)="N") goto FinishSerial
if (len(SerialNo)=6) goto FinishSerial
beep
println
println "@X0CSerial # must be 6 characters in length! Please try again ..."
println
goto GetCustName
:FinishSerial
if (CustomerNumber="" | left(CustomerNumber,1)=" ") CustomerNumber="None"
inputtext "Customer # (if applicable)",CustomerNumber,@X0E,6
println
CustomerNumber=upper(CustomerNumber)
inputtext "Purchaser Name",Name,@X0E,50
Name=upper(Name)
ShipName=Name
println
inputstr " Voice Phone #",VoicePhone,@X0E,13,"1234567890.-()/",2
println
inputstr " FAX Phone #",FaxPhone,@X0E,13,"1234567890.-()/",2
println
inputtext " Company Name",Company,@X0E,50
Company=upper(Company)
ShipCompany=Company
println
inputtext "Street Address",Address,@X0E,50
Address=upper(Address)
ShipAddress=Address
println
inputtext " City",City,@X0E,25
City=upper(City)
ShipCity=City
println
inputtext "State/Province",State,@X0E,2
State=Upper(state)
ShipState=State
println
inputtext " ZIP",Zip,@X0E,10
Zip=upper(Zip)
ShipZip=Zip
println
inputtext " Country",Country,@X0E,20
println
OutSideUSA=False
Country=Upper(Country)
ShipCountry=Country
if (Country="USA" & State="") gosub BadState
if (Country="" & State="") gosub BadState
if (Country="USA" & State="") goto GetCustName
if (Country="" & State="") goto GetCustName
if (Country<>"USA") OutSideUSA=True
if (Country="") OutsideUSA=false
;*************************************************
;* Let Them Verify their Information *
;*************************************************
cls
println "@X0EYou have entered the following purchaser information:"
println
print "@X0F Serial #: "
println "@X07",SerialNo
print "@X0F Customer Number: "
println "@X07",CustomerNumber
print "@X0F Customer Name: "
println "@X07",Name
print "@X0F Voice Phone #: "
println "@X07",VoicePhone
print "@X0F FAX Phone #: "
println "@X07",FaxPhone
if (Company="") goto SkipCompany
print "@X0F Company: "
println "@X07",Company
:SkipCompany
print "@X0F Address: "
println "@X07",Address
print "@X0F "
println "@X07"+City+", "+state+" "+Zip
print "@X0F "
println "@X07",Country
println "@X07"
Answer="Y"
inputyn "Is the above information correct (Y/N)",Answer,@X0E
println
if (Answer="Y") goto ShipContinue
println
goto GetCustName
;*****************************************************
;* If they are in USA, make them enter a valid State *
;*****************************************************
:BadState
cls
beep
println
println "@X0CYou must enter a valid State! Please re-enter your information ..."
println "@X0E"
return
;********************************************
;* Find Out if Shipping is the Same? *
;********************************************
:ShipContinue
Answer="Y"
inputyn "Is the Shipping Information the Same as above (Y/N)",Answer,@X0E
println
ShipDifferent=False
if (Answer="Y") goto Main
;********************************************
;* Nope - get correct shipping info *
;********************************************
:GetShipInfo
println
ShipDifferent=True
inputtext " Ship Name",ShipName,@X0E,50
ShipName=upper(ShipName)
println
inputtext " Ship Company",ShipCompany,@X0E,50
ShipCompany=upper(ShipCompany)
println
inputtext " Ship Address",ShipAddress,@X0E,50
ShipAddress=upper(ShipAddress)
println
inputtext " Ship City",ShipCity,@X0E,25
ShipCity=upper(ShipCity)
println
inputtext "Ship State/Pro",ShipState,@X0E,2
ShipState=Upper(ShipState)
println
inputtext " Ship ZIP",ShipZIP,@X0E,10
ShipZip=Upper(ShipZip)
println
inputtext " Ship Country",ShipCountry,@X0E,20
println
OutSideUSA=False
ShipCountry=Upper(ShipCountry)
if (ShipCountry="USA" & ShipState="") gosub BadState
if (ShipCountry="" & State="") gosub BadState
if (ShipCountry="USA" & ShipState="") goto GetShipInfo
if (ShipCountry="" & State="") goto GetShipInfo
if (ShipCountry<>"USA") OutSideUSA=True
if (ShipCountry="") OutsideUSA=false
;**************************************************
;* Now Verify their 'ShipTo' Information *
;**************************************************
cls
println "@X0EYou have entered the following shipping information:"
println
print "@X0F Ship Name: "
println "@X07",ShipName
if (ShipCompany="") goto SkipShipCompany
print "@X0F Ship Company: "
println "@X07",ShipCompany
:SkipShipCompany
print "@X0F Address: "
println "@X07",ShipAddress
print "@X0F "
println "@X07"+ShipCity+", "+ShipState+" "+SHipZip
print "@X0F "
println "@X07",ShipCountry
println "@X07"
Answer="Y"
inputyn "Is the above information correct (Y/N)",Answer,@X0E
println
if (Answer="Y") goto Main
println
goto GetShipInfo
;*****************************************************************************
;* Here's Where we start the menu selection process *
;*****************************************************************************
:Main
cls
dispfile "c:\pcb\gen\choices.txt",0
println
Command=""
inputstr "@X0EMain Order Command: (1-6), (R), (S), (A)",Command,@X0E,1,"123456RSA",10
println
if (Command="") goto Main
if (Command="S") goto WriteScript
if (Command="R") goto ReviewOrder
if (Command="A") goto AbortScript
if (NumOrders=10) goto excessive
if (Command="1") gosub NewOrder
if (Command="2") gosub UpgradeOrder
if (Command="3") gosub OtherSWOrder
if (Command="4") gosub HardwareOrder
if (Command="5") gosub RenewalOrder
if (Command="6") gosub PackageOrder
goto Main
;*****************************************************************************
;* Terminate the script because the caller did not wish to continue *
;*****************************************************************************
:AbortScript
println
beep
println "@X0FScript Aborted. Returning to normal board operations ..."
stop
;*****************************************************************************
;* Excessive Number of Orders - MAX Allowed is 10 *
;*****************************************************************************
:Excessive
Println
beep
println "@X0CA maximum number of @X0F10@X0C items can be ordered with this Script!"
println
gosub pressakey
goto main
;*****************************************************************************
;* Review The order here - what they have ordered so far *
;*****************************************************************************
:ReviewOrder
Review=True
gosub verify
if (NumOrders>0) goto ReviewContinue
goto main
:ReviewContinue
Answer="R"
inputstr "Verify Command: (D)elete Item, (R)eturn to Main Menu (S)ave Order",Answer,@X0E,1,"DRS",10
println
if (Answer="") goto ReviewContinue
if (Answer="R") goto Main
if (Answer="S") goto SaveNow
beep
Item=0
inputint "Which item # do you wish to delete (0 to Cancel)",Item,@X0C
if (Item=0) goto ReviewOrder
if (Item=>1 & Item<=NumDisp) goto ValidDelete
beep
println
println "@X0CYou entered an invalid item number!"
println
gosub pressakey
goto revieworder
;************************************************
;* Allow them to delete an item already ordered *
;************************************************
:ValidDelete
NumOrders=NumOrders-1
OrderText(Item)=""
OrderArray(Item,1)=0
OrderArray(Item,2)=0
if (Item=10) goto ReviewOrder
if (NumOrders=0) goto Main
:IncrementDelete
OrderText(Item)=OrderText(Item+1)
OrderArray(Item,1)=OrderArray(Item+1,1)
OrderArray(Item,2)=OrderArray(Item+1,2)
Item=Item+1
OrderText(Item)=""
OrderArray(Item,1)=0
OrderArray(Item,2)=0
if (Item>NumOrders+1) goto ReviewOrder
goto IncrementDelete
;*****************************************************************************
;* This is the New Order Part *
;*****************************************************************************
:NewOrder
cls
dispfile "c:\pcb\gen\newprod.txt",0
println
:NewOrderAgain
Command=""
inputstr "New Product Selection: (1-2), (E)xit",Command,@X0E,1,"12E",10
println
if (Command="") goto NewOrderAgain
if (Command="1") goto StandardOrder
if (Command="2") goto MCodeOrder
:ReturnToMain
command=""
return
;***************************************
;* Standard Code Ordering Part *
;***************************************
:StandardOrder
cls
standard=0
dispfile "c:\pcb\gen\pcbstan.txt",0
println
Command=""
inputstr "Standard Product Selection: (1-5), (E)xit",Command,@X0E,1,"12345E",10
PRINTLN
if (Command="") goto ReturnToMain
if (instr("12345",command)<1) goto ReturnToMain
Standard=Command
StandardDisplay="PCBoard "
if (command="1") StandardDisplay=StandardDisplay+"2"
if (command="2") StandardDisplay=StandardDisplay+"10"
if (command="3") StandardDisplay=StandardDisplay+"100"
if (command="4") StandardDisplay=StandardDisplay+"250"
if (command="5") StandardDisplay=StandardDisplay+"1000"
StandardDisplay=StandardDisplay+" Node Standard Code for $ "
println
print "@X0FProduct Ordered: "
print "@X07",StandardDisplay
pricedisplay=StandardPrices(Standard,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
if (Answer="N") goto StandardOrder
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=StandardPrices(Standard,1)
OrderArray(NumOrders,2)=StandardPrices(Standard,2)
OrderText(NumOrders)=StandardDisplay+PriceDisplay
goto ReturnToMain
;******************************************
;* /M Code Ordering Part *
;******************************************
:MCodeOrder
cls
MCode=0
dispfile "c:\pcb\gen\pcb-m.txt",0
println
Command=""
inputstr "/M Code Product Selection: (1-4), (E)xit",Command,@X0E,1,"1234E",10
println
if (Command="") goto ReturnToMain
if (instr("1234",command)<1) goto ReTurnToMain
MCode=Command
MCodeDisplay="PCBoard "
if (command="1") MCodeDisplay=MCodeDisplay+"10"
if (command="2") MCodeDisplay=MCodeDisplay+"100"
if (command="3") MCodeDisplay=MCodeDisplay+"250"
if (command="4") MCodeDisplay=MCodeDisplay+"1000"
MCodeDisplay=MCodeDisplay+" Node /M (80386) Code for $ "
println
print "@X0FProduct Ordered: "
print "@X07",MCodeDisplay
pricedisplay=MCodePrices(MCode,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
if (Answer="N") goto MCodeOrder
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=MCodePrices(MCode,1)
OrderArray(NumOrders,2)=MCodePrices(MCode,2)
OrderText(NumOrders)=MCodeDisplay+PriceDisplay
goto ReturnToMain
;****************************************************
;* Package Deal Order Part *
;****************************************************
:PackageOrder
cls
Package=0
dispfile "c:\pcb\gen\package.txt",0
println
Command=""
inputstr "/M Package Deal Product Selection: (1-3), (E)xit",Command,@X0E,1,"123E",10
println
if (Command="") goto ReturnToMain
if (instr("123",command)<1) goto ReTurnToMain
Package=Command
if (command="1") PackageDisplay="10/M, ARNET 4, DOORWAY, DESQView, Cables"
if (command="2") PackageDisplay="10/M, ARNET 8, DOORWAY, DESQView, Cables"
if (command="3") PackageDisplay="100/M, ARNET 8, DOORWAY, DESQView, Cables"
PackageDisplay=PackageDisplay+" for $ "
println
print "@X0FProduct Ordered: "
print "@X07",PackageDisplay
pricedisplay=PackagePrices(Package,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
if (Answer="N") goto PackageOrder
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=PackagePrices(Package,1)
OrderArray(NumOrders,2)=PackagePrices(Package,2)
OrderText(NumOrders)=PackageDisplay+PriceDisplay
goto ReturnToMain
;****************************************************
;* Hardware Order Part *
;****************************************************
:HardwareOrder
cls
Hardware=0
dispfile "c:\pcb\gen\hardware.txt",0
println
Command=""
inputstr "Hardware Product Selection: (1-5), (E)xit",Command,@X0E,1,"12345E",10
println
if (Command="") goto ReturnToMain
if (instr("12345",command)<1) goto ReTurnToMain
Hardware=Command
if (command="1") HardwareDisplay="ARNET 4-Port Serial card w/o Cables"
if (command="2") HardwareDisplay="ARNET 4-Port Serial card with Cables"
if (command="3") HardwareDisplay="ARNET 8-Port Serial card w/o Cables"
if (command="4") HardwareDisplay="ARNET 8-Port Serial card with Cables"
if (command="5") HardwareDisplay="Willies' 4-Port Serial Card w/16550's"
HardwareDisplay=HardwareDisplay+" for $ "
println
print "@X0FProduct Ordered: "
print "@X07",HardwareDisplay
pricedisplay=HardwarePrices(Hardware,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
if (Answer="N") goto HardwareOrder
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=HardwarePrices(Hardware,1)
OrderArray(NumOrders,2)=HardwarePrices(Hardware,2)
OrderText(NumOrders)=HardwareDisplay+PriceDisplay
goto ReturnToMain
;*************************************************
;* Other Software Order *
;*************************************************
:OtherSWOrder
cls
OtherSW=0
dispfile "c:\pcb\gen\othersw.txt",0
println
Command=""
inputstr "Other Software Product Selection: (1-4), (E)xit",Command,@X0E,1,"1234E",10
println
if (Command="") goto ReturnToMain
if (instr("1234",command)<1) goto ReTurnToMain
OtherSW=Command
if (command="1") OtherSWDisplay="PCBoard Development ToolKit"
if (command="2") OtherSWDisplay="PCB-MHS Novell GateWay"
if (command="3") OtherSWDisplay="DOORWAY Remote Access/DOS"
if (command="4") OtherSWDisplay="DESQview 386 Multitasking"
OtherSWDisplay=OtherSWDisplay+" Software for $ "
println
print "@X0FProduct Ordered: "
print "@X07",OtherSWDisplay
pricedisplay=OtherSWPrices(OtherSW,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
if (Answer="N") goto OtherSWOrder
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=OtherSWPrices(OtherSW,1)
OrderArray(NumOrders,2)=OtherSWPrices(OtherSW,2)
OrderText(NumOrders)=OtherSWDisplay+PriceDisplay
goto ReturnToMain
;***************************************************
;* This is the Upgrade Part *
;***************************************************
:UpgradeOrder
cls
Upgrade=0
DownloadOnly=False
dispfile "c:\pcb\gen\upgrade.txt",0
println
Command=""
inputstr "Upgrade Product Selection: (1-7), (E)xit",Command,@X0E,1,"1234567E",10
println
if (Command="") goto ReturnToMain
if (instr("1234567",command)<1) goto ReTurnToMain
Upgrade=Command
if (command="1") UpgradeDisplay="Like-to-Like Upgrade"
if (command="2") UpgradeDisplay="2 Node to 10 Node Upgrade"
if (command="3") UpgradeDisplay="2 Node to 100 Node Upgrade"
if (command="4") UpgradeDisplay="10 Node to 100 Node Upgrade"
if (command="5") UpgradeDisplay="10 Node to 250 Node Upgrade"
if (command="6") UpgradeDisplay="100 Node to 250 Node Upgrade"
if (command="7") UpgradeDisplay="/M Code Supplement"
UpgradeDisplay=UpgradeDisplay+" for $ "
println
print "@X0FProduct Ordered: "
print "@X07",UpgradeDisplay
pricedisplay=UpgradePrices(Upgrade,1)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
println
if (Answer="N") goto UpgradeOrder
if (Upgrade=1 | Upgrade=7) goto FinishUpgrade
println
answer="Y"
inputyn "Download your upgrade and save $25 (Y/N)",Answer,@X0E
if (answer="N") goto FinishUpgrade
dlprice=UpgradePrices(Upgrade,1)-25
pricedisplay=dlprice
pricedisplay=pricedisplay+".00 via D/L"
DownLoadOnly=True
:FinishUpgrade
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=UpgradePrices(Upgrade,1)
if (DownLoadOnly) OrderArray(NumOrders,1)=OrderArray(NumOrders,1)-25
if (!DownloadOnly) OrderArray(NumOrders,2)=UpgradePrices(Upgrade,2)
OrderText(NumOrders)=UpgradeDisplay+PriceDisplay
goto ReturnToMain
;*******************************************************
;* This is the Support Renewal Part *
;* Get the serial Number for Support Renewal *
;*******************************************************
:RenewalOrder
cls
Support=0
Extended=False
dispfile "c:\pcb\gen\sprt.txt",0
println
Command=""
inputstr "Support Renewal Selection: (1-2), (E)xit",Command,@X0E,1,"12E",10
println
if (Command="") goto ReturnToMain
if (instr("12",command)<1) goto ReTurnToMain
Support=Command
if (command="1") SupportDisplay="Standard Renewal"
if (command="2") SupportDisplay="Extended Renewal"
SupportDisplay=SupportDisplay+" for $ "
println
print "@X0FSupport Ordered: "
print "@X07",SupportDisplay
pricedisplay=SupportPrices(Support)
pricedisplay=pricedisplay+".00"
println pricedisplay
println
Answer="Y"
inputyn "Is the above correct (Y/N)",Answer,@X0E
println
if (Answer="N") goto RenewalOrder
if (Command="1") goto FinishSupport
:GetShirtSize
TShirtSize="XL"
inputstr "What size T-Shirt do you want (L/XL/XXL)",TShirtSize,@X0E,3,"XLxl",2
println
TShirtSize=Upper(TShirtSize)
if (TShirtSize<>"L" & TShirtSize<>"XL" & TShirtSize<>"XXL") goto GetShirtSize
TShirtSize=" T-Shirt Size: "+TShirtSize
Extended=True
:FinishSupport
NumOrders=NumOrders+1
OrderArray(NumOrders,1)=SupportPrices(Support)
OrderText(NumOrders)=SupportDisplay+PriceDisplay
goto ReturnToMain
;*************************************************************
;* Wait for a keypress - Generic - displays the prompt *
;* 'Press (Enter) to Continue ...' and then returns *
;*************************************************************
:PressAKey
wait
return
;*****************************************************************
;* Verify Menu Portion of Order So Far and Before Saving *
;*****************************************************************
:Verify
cls
totalweight=0
subtotal=0
totalfreight=0
StartNum=1
NumDisp=1
Match=false
:CalcWeight
if (NumOrders=0) goto ContinueDisplay
if (OrderArray(StartNum,1)>0) TotalWeight=TotalWeight+OrderArray(Startnum,2)
Startnum=Startnum+1
if (Startnum<=NumOrders) goto CalcWeight
if (TotalWeight=0) goto NoWeight
if (OutSideUSA) goto CalcForeign
;******************************************
; Load Domestic FedEx Chart & Calculate *
;******************************************
fopen 1,"c:\pcb\gen\domestic.fex",0,0
startnum=1
:FEXDomestic
fget 1,Domestic
Error=Ferr(1)
if (Error) goto DefaultDomestic
if (left(Domestic,1)=";") goto FEXDomestic
if (Startnum=Totalweight) goto CalcFedEx
startnum=startnum+1
goto FEXDomestic
;**********************************
;Unable to locate a match *
;**********************************
:defaultDomestic
Domestic="72+100 130 150"
:CalcFedEx
fclose 1
FEXEcon=mid(Domestic,4,3)
FEXStan=mid(Domestic,8,3)
FEXPrio=mid(Domestic,12,3)
if (State<>"HI" & State<>"AK") goto DomesticChoice
FEXEcon=FEXEcon+10
FEXStan=FEXStan+10
FEXPrio=FEXPrio+10
:DomesticChoice
println
print "@X0EYour total shipping weight is @X0F"
print TotalWeight
println "@X0E pounds. We ship only by @X0CFederal Express@X0E."
println "@X0EFederal Express delivery days are based on '@X0ABusiness Days@X0E' and do @X0CNOT@X0E"
println "include weekends or Holidays. How would you like your order shipped:"
println
print "@X0F(1)@X0E Economy Two-Day Business Service for ............... $ @X0F"
print FEXEcon
println ".00"
print "@X0F(2)@X0E Standard Overnight (3:30pm delivery most areas) for $ @X0F"
print FEXStan
println ".00"
print "@X0F(3)@X0E Priority Overnight (10:30am delivery most areas) for $ @X0F"
print FEXPrio
println ".00"
println
Answer="1"
inputstr "Shipping Method Desired: (1) Economy, (2) Standard, (3) Priority",Answer,@X0E,1,"123",2
println
if (Answer="1") TotalFreight=FEXEcon
if (Answer="2") Totalfreight=FEXStan
if (Answer="3") TotalFreight=FEXPrio
if (Answer="1") DomesticShipType="2-Day Economy"
if (Answer="2") DomesticShipType="Standard Overnight"
if (Answer="3") DomesticShipType="Priority Overnight"
goto ContinueDisplay
;*********************************************************
;* Calculate Overseas Shipping Charges *
;*********************************************************
;**********************************************************
;* First, load COUNTRY.IDX and try to find a match on the *
;* country they entered. 'Ship-To' country will always *
;* over-ride 'Sold-To' country. *
;**********************************************************
:CalcForeign
Match=false
fopen 1,"c:\pcb\gen\country.idx",0,0
print "@X0FPlease wait while we load non-domestic shipping tables ..."
:GetCountry
fget 1,Foreign
Error=Ferr(1)
if (Error) goto NoCountryMatch
if (left(foreign,1)=";") goto GetCountry
FileCountry=left(foreign,15)
FileCountry=rtrim(FileCountry," ")
if (instr(ShipCountry,FileCountry)>0) goto FoundMatch
goto GetCountry
:FoundMatch
match=true
goto FinishCountryFile
:NOCountryMatch
match=false
beep
println
println
print "@X0CAn exact country match on country '@X0F",ShipCountry,"@X0C' was not found!"
;**********************************************************
;* Setting FEXZone=7 and DHLZone=H before actually using *
;* the proper match information means that if a country *
;* match was not made we will use the highest rate data *
;* available. This is good because most likely their *
;* country would fall under that category since the major *
;* countries are all listed. *
;**********************************************************
;**********************************************************
;* Do a lookup from the FedEx table called OVERSEAS.FEX *
;**********************************************************
:FinishCountryFile
fclose 1
FEXZone="7"
DHLZone="H"
if (Match) FEXZone=mid(foreign,16,1)
if (Match) DHLZone=mid(foreign,18,1)
if (FEXZone="0") goto DHLCalc
if (Totalweight>72) goto DefaultFEX
fopen 1,"c:\pcb\gen\overseas.fex",0,0
startnum=1
:FEXOverseas
fget 1,foreign
Error=Ferr(1)
if (Error) goto DefaultFEX
if (left(Foreign,1)=";") goto FEXOverseas
if (Startnum=TotalWeight) goto FEXCalc
startnum=Startnum+1
goto FEXOverseas
:DefaultFEX
Foreign="72+ 200 270 310 295 360 540 660"
:FEXCalc
fclose 1
if (FEXZone="1") FEXPrio=mid(foreign,6,3)
if (FEXZone="2") FEXPrio=mid(foreign,11,3)
if (FEXZone="3") FEXPrio=mid(foreign,16,3)
if (FEXZone="4") FEXPrio=mid(foreign,21,3)
if (FEXZone="5") FEXPrio=mid(foreign,26,3)
if (FEXZone="6") FEXPrio=mid(foreign,31,3)
if (FEXZone="7") FEXPrio=mid(foreign,36,3)
;**********************************************************
;* Do a lookup from the DHL table called OVERSEAS.DHL *
;**********************************************************
:DHLCalc
if (DHLZone="0") goto ForeignChoice
if (totalweight>72) goto DefaultDHL
fopen 1,"c:\pcb\gen\overseas.dhl",0,0
startnum=1
:DHLNext
fget 1,foreign
Error=Ferr(1)
if (Error) goto DefaultDHL
if (left(foreign,1)=";") goto DHLNext
if (Startnum=Totalweight) goto DHLFinish
startnum=startnum+1
goto DHLNext
:DefaultDHL
Foreign="72+ 205 215 220 195 300 380 250 440"
:DHLFinish
fclose 1
if (DHLZone="A") DHLPrio=mid(foreign,6,3)
if (DHLZone="B") DHLPrio=mid(foreign,11,3)
if (DHLZone="C") DHLPrio=mid(foreign,16,3)
if (DHLZone="D") DHLPrio=mid(foreign,21,3)
if (DHLZone="E") DHLPrio=mid(foreign,26,3)
if (DHLZone="F") DHLPrio=mid(foreign,31,3)
if (DHLZone="G") DHLPrio=mid(foreign,36,3)
IF (DHLZone="H") DHLPrio=mid(foreign,41,3)
:ForeignChoice
println
println
if (Match) goto SkipNoMatch
beep
answer="R"
println "@X0EDo you want to use the (@X0BD@X0E)efault shipping charges or (@X0BR@X0E)e-enter your Country"
inputstr "in a different format in order to find a possible direct match (D/R)",Answer,@X0E,1,"DR",10
println "@X0E"
if (Answer="D") cls
if (Answer="D") goto SkipNoMatch
:ShipAgain
println
inputtext " Ship Country",ShipCountry,@X0E,20
cls
OutSideUSA=False
ShipCountry=Upper(ShipCountry)
if (ShipCountry<>"USA") OutSideUSA=True
if (ShipCountry="") OutsideUSA=false
goto CalcForeign
:SkipNoMatch
print "@X0ETotal shipping weight is @X0F"
print TotalWeight
println "@X0E pounds. Available shipping to your area"
println "is as follows:"
println
print "@X0F(1)@X0E Federal Express International for USD $ @X0F"
if (FEXZone="0") println "(Not Available)"
if (FEXZone<>"0") print right(FEXPrio,3)
if (FEXZone<>"0") println ".00"
print "@X0F(2)@X0E DHL International for ........... USD $ @X0F"
if (DHLZone="0") println "(Not Available)"
if (DHLZone<>"0") print right(DHLPrio,3)
if (DHLZone<>"0") println ".00"
if (ShipCountry<>"CANADA") goto SkipCanada
if (TotalWeight<=20) CanadaUPS=9+totalweight
if (TotalWeight>20 & TotalWeight<31) CanadaUPS=30
if (TotalWeight>30) CanadaUPS=totalWeight
print "@X0F(3)@X0E UPS Canada Delivery for ......... USD $ @X0F"
print right(CanadaUPS,3)
println ".00"
:SkipCanada
println
println "@X0AFederal Express@X0E maintains their own Custom's Agents and usually provides"
println "@X0B2-3 day service@X0E throughout the world. @X0ADHL@X0E requires your own Custom's Agent"
println "and usually provides @X0B4-5 day service@X0E. Both FedEx and DHL may not be"
println "available in your area. @X0AUPS@X0E to Canada takes about @X0B5-10@X0E days to arrive"
println "depending on custom's delays."
println
println "@X0DFor all Canadian orders, you will be required to pay GST on package arrival."
println "For all overseas orders, you will be responsible for import tariff's (if any)."
:GetShipAgain
println "@X0E"
Answer="1"
if (left(OverseasShipType,1)="F") Answer="1"
if (left(OverseasShipType,1)="D") Answer="2"
if (left(OverseasShipType,1)="U") Answer="3"
if (ShipCountry<>"CANADA") inputstr "Shipping Method Desired: (1) FedEx, (2) DHL",Answer,@X0E,1,"12",2
if (ShipCountry="CANADA") inputstr "Shipping Method Desired: (1) FedEx, (2) DHL, (3) UPS",Answer,@X0E,1,"123",2
println
if (Answer="") goto GetShipAgain
if (Answer="1" & FEXZone="0") goto BadForeign
if (Answer="2" & DHLZone="0") goto BadForeign
if (Answer="3" & ShipCountry<>"CANADA") goto BadForeign
TotalFreight=FEXPrio
OverseasShipType="Federal Express"
if (Answer="2") Totalfreight=DHLPrio
if (Answer="2") OverseasShipType="DHL Overseas"
if (Answer="3") TotalFreight=CanadaUPS
if (Answer="3") OverseasShipType="UPS Canada"
goto ContinueDisplay
;**********************************************************
;* We are going to require them to enter a valid shipping *
;* choice. *
;**********************************************************
:BadForeign
beep
println
println "@X0CYou must choose a valid shipping method! If you wish to leave us a comment"
println "concerning the shipping charges, you will be given the opportunity of doing so"
println "at the time you (S)ave your order."
println "@X0E"
gosub pressakey
goto ForeignChoice
;***********************************************************
;* Now that we have calculated either Domestic or Overseas *
;* shipping charges, we'll display the caller's order so *
;* far to them - along with freight charges. *
;***********************************************************
:ContinueDisplay
cls
orderplaced=false
:NoWeight
println "@X0EYou have currently placed an order for the following:"
println
startnum=1
:CheckAgain
if (NumOrders=0) goto DisplayNothing
if (OrderArray(StartNum,1)<1) goto IncrementVerify
OrderPlaced=True
print "@X0F "
print right(NumDisp,2)
NumDisp=NumDisp+1
println "@X07. ",OrderText(StartNum)
SubTotal=SubTotal+OrderArray(Startnum,1)
:IncrementVerify
startnum=startnum+1
if (startnum<=NumOrders) goto CheckAgain
if (Orderplaced) goto DisplayPrices
:DisplayNothing
println "@X07 Nothing!"
println
NumOrders=0
gosub pressakey
command=""
return
:DisplayPrices
println
if (totalweight=0) goto SkipShip
print "@X0F Sub-Total: USD $ "
print "@X07"
print right(subtotal,5)
println ".00"
print "@X0F S&H Charges: USD $ "
print "@X07"
print right(TotalFreight,5)
println ".00"
:SkipShip
TotalPrice=Subtotal+TotalFreight
print "@X0F Grand Total: USD $ "
print "@X07"
print right(TotalPrice,5)
println ".00"
println
command=""
if (ShipState<>"UT") return
if (TotalWeight=0) return
println "@X0ASince you are from Utah, we will be adding 6.25% sales tax to"
println "your order at the time the credit card is run."
println
Return
;************************************************************
;* Get ready to save their order. First, re-verify it if *
;* they have not already decided to save their order from *
;* the review screen. If they have, don't redisplay the *
;* verification menu again. *
;************************************************************
:WriteScript
Review=False
if (NumOrders<>0) goto FinishScript
BEEP
println
println "@X0CNothing has been Ordered!"
println
gosub pressakey
goto Main
:FinishScript
gosub verify
println
Answer="Y"
inputyn "Is the above information correct (Y/N)",Answer,@X0E
println
if (answer="N") goto Main
;***********************************************************
;* This label is called when a customer saves their order *
;* direct from the review screen. *
;***********************************************************
:SaveNow
println
Answer="N"
println "@X0EBefore actually saving your order, you can leave us two general comment lines"
inputyn "@X0Econcerning the placement of this order. Do you wish to do so (Y/N)",Answer,@X0E
if (Answer<>"Y") goto DisplayLegal
println
inputtext "Comment 1: ",Comment1,@X0E,50
println
inputtext "Comment 2: ",Comment2,@X0E,50
println
;*********************************************************************
;* Getting ready to save their order, we best tell them that if they *
;* are using a stolen credit card we will be unhappy! *
;*********************************************************************
:DisplayLegal
CLS
dispfile "c:\pcb\gen\legal.txt",0
println
print " @X0FWe will be charging your credit card in the amount of USD $ "
print ToTalPrice
println ".00"
println
Answer="Y"
inputyn " Do you agree to this purchase (Y/N)",Answer,@X0E
println
if (Answer<>"Y") goto AbortScript
:WriteInfo
if (!OnLocal) fputln 0," User Info: ",U_CMNT2
fputln 0," Purchaser S/N: ",SerialNo
fputln 0," Customer Number: ",CustomerNumber
fputln 0,""
fputln 0," CREDIT CARD INFO."
fputln 0," Credit Card #: ",CCDisplay
fputln 0," Expiration Date: ",CCExpireDisplay
fputln 0," Cardholder's Name: ",CCName
fputln 0," Cardholder's Phone: ",CCPhone
fputln 0,""
fputln 0," SOLD TO INFORMATION"
fputln 0," Voice Phone: ",VoicePhone
fputln 0," FAX Phone: ",FAXPhone
fputln 0," Purchaser: ",Name
if (Company<>"") fputln 0," Company: ",Company
fputln 0," Address: ",Address
fputln 0," City/State/ZIP: ",City,", ",State," ",Zip
fputln 0," Country: ",Country
fputln 0,""
if (! ShipDifferent) goto FinishUp
fputln 0," SHIP TO INFORMATION"
fputln 0," Ship Name: ",ShipName
if (ShipCompany<>"") fputln 0," Ship Company: ",ShipCompany
fputln 0," Ship Address: ",ShipAddress
fputln 0," Ship City/State/ZIP: ",ShipCity,", ",ShipState," ",ShipZip
fputln 0," Ship Country: ",ShipCountry
fputln 0,""
:FinishUp
fputln 0,"PRODUCTS/SERVICES ORDERED"
StartNum=1
:PrnAnother
fput 0," Product # "
fput 0,right(StartNum,2)
fputln 0,": ",OrderText(StartNum)
startNum=StartNum+1
if (StartNum<=NumOrders) goto PrnAnother
if (Extended) fputln 0," T-Shirt Size: ",TShirtSize
fputln 0,""
fput 0," Ship Weight: "
fput 0,TotalWeight
fputln 0," #'s"
fput 0," Sub-Total: $ "
fput 0,right(SubTotal,5)
fputln 0,".00"
fput 0," S&H Total: $ "
fput 0,right(TotalFreight,5)
fputln 0,".00"
fput 0," Grand Total: $ "
fput 0,right(TotalPrice,5)
fputln 0,".00"
fput 0," Shipping via: "
if (OutsideUSA) fputln 0,OverseasShipType
if (!OutsideUSA) fputln 0,DomesticShipType
fputln 0,""
fputln 0," Agree to Charge: YES"
fputln 0," Order Comment 1: ",Comment1
fputln 0," Order Comment 2: ",Comment2
fputln 0,""
fputln 0,""
fputln 0," Card Authorization #: _______________________"
fputln 0,""
fputln 0," Authorization Ref. #: _______________________"
end